
let Tray = require('./');
let path = require('path')

let tray = new Tray('./icon.png');

tray.title = "Simple Example Tray"; // Sets the tooltip to display


tray.on("click", () => console.log("Left Click!"));
tray.on("right-click", () => console.log("Right Click!"));
let i = 0;

setTimeout(()=> blinkTrayIcon() , 5000);


function blinkTrayIcon(){
  setInterval(() => {
    if (i++ %2) {
      tray.icon = './icon.png'
    } else {
      tray.icon = './icon2.png'
    }
  }, 1000)
}

